Test Series - computer fundamental

Test Number 18/95

Q: What is the 1’s complement of 11010?
A. 11010
B. 11011
C. 00110
D. 00101
Solution: The 1’s complement of a number is obtained by converting all the 0 bits to 1 and all 1’s to 0’s. Here, 11010 gets converted to 00101.
Q: 2’s complement is obtained by adding 1 to 1’s complement of a number.
A. True
B. False
C. none
D. ....
Solution: The statement is true. Let us take an example: Consider the number 110000.
1’s complement of the number is 001111. 2’s complement=001111+1=010000.
Q: The 10’s complement of 562 is __________
A. 4
B. 3
C. 7
D. 8
Solution: 10’s complement is obtained by adding 1 to the 9’s complement of a number.
Here, 9’s complement=999-562=436.
Therefore, 10’s complement=436+1=437.
Q: The 9’s complement of 6578 is ___________
A. 1234
B. 3421
C. 3124
D. 3420
Solution: 9’s complement is obtained by subtracting 9 from each bit of the number.
Here, 9999-6578=3421.
Therefore, the 9’s complement is 3421.
Q: >> operator is used to denote _________
A. left shift
B. right shift
C. greater than
D. less than
Solution: >> operator denotes the right shift in binary arithmetic.
E.g. If we say, >>110 by 2-bits, the value obtained will be 001.
Similarly, << denotes the right shift operator.
Q: The subtraction using 1’s complement of 110 – 100 will give the result __________
A. -011
B. 011
C. 010
D. -010
Solution: To subtract using 1’s complement: Take the 1’s complement of the 2nd number (here, 011) and add it to the first number. (110+011=1,001).
If the carry is generated, it is added to the result (001+1=010).
If a carry is not generated then it is converted to its 1’s complement form.
Q: The result obtained on subtraction using 2’s complement of 1111-0010 will be _________
A. 11101
B. 11011
C. 1101
D. 1011
Solution: Firstly, the 2’s complement of the 2nd number is obtained.
Then, if carry is generated, it is discarded and the number is positive.
Otherwise, 2’s complement of the result is obtained and the answer is negative.
Here, 1111+1110=1, 1101. Since carry is generated, it is discarded and the answer is positive.
Q: The 1’s complement of 1111111110.101 is ___________
A. 1.010
B. 0000000000.010
C. 1111111110.101
D. 1.101
Solution: The 1’s complement of a number is obtained by reversing the bits with value 1 to 0 and the bits with value 0 to 1. Here, 11111111110.101 gets converted to 000000001.010 in its 1’s complement format.
Q: 7’s complement of 432 is _________________
A. 432
B. 543
C. 345
D. 777
Solution: To find the 7’s complement of any number, we simply subtract 7 from each of the bits.
Here, 777-432=345. So, the 7’s complement is 345.
Q: The 16’s complement of 74E will be _________
A. 8B2
B. F8B2
C. 2B8
D. 8C2
Solution: The 16’s complement is obtained by subtracting 16 from each of the bits of that number.
Here, 16’s complement of 074E will be F8B2.

You Have Score    /10